<script>

let p = Promise.resolve("success!!");
let p1 = new Promise((resolve, reject)=>{
	console.log("1.这个再promise中会立即执行");
	setTimeout(()=>resolve("timeout success!!"), 3000);
});

//Promise.then中的代码会在下一个事件循环中执行
p.then(result=>console.log("3." + result));
p1.then(result=>console.log("4." + result));
console.log("2.finally");

</script>